package com.gitee.feizns.menu.exception;

import com.gitee.feizns.menu.Menu;

/**
 * 不具备指定菜单的权限
 * @author feizns
 * @since 2019/5/4 0004
 */
public class UnauthorizedException extends RuntimeException {

    /**
     * 未授权的菜单
     */
    private Menu unauthorizedMenu;

    public UnauthorizedException(String message, Menu unauthorizedMenu) {
        super(message);
        this.unauthorizedMenu = unauthorizedMenu;
    }

    public Menu getUnauthorizedMenu() {
        return unauthorizedMenu;
    }

}
